package com.example.xm.schedu;

import com.example.xm.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class ProductSchedu {
    @Autowired
    ProductService productService;
    @Scheduled(cron = "0 0 1 * * ?")
    public void fixedRate() {
        productService.guoqiTime();
//        System.out.println("fixedRate>>"+new Date());
    }
}
